5) U aktivnom radnom listu pronaci oblast 2x2 sa najvecom sumom i israfirati je.
Ograniciti se na opseg A1:H8



Sub zad5()
imax = 1
jmax = 1
smax = Cells(1, 1) + Cells(1, 2) + Cells(2, 1) + Cells(2, 2)
For i = 1 To 7
 For j = 1 To 7
  s = Cells(i, j) + Cells(i, j + 1) + Cells(i + 1, j) + Cells(i + 1, j + 1)
  If s > smax Then
  smax = s
  imax = i
  jmax = j
  End If
  Next
  Next
  ActiveWorkbook.ActiveSheet.Range(Cells(imax, jmax), Cells(imax + 1, jmax + 1)).Interior.Pattern = xlPatternCrissCross
End Sub